<?php

namespace App\Models\Posts;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;

class WxPostsSound extends Model
{
	use HasDateTimeFormatter;
    use SoftDeletes;

    protected $table = 'wx_posts_sounds';

    protected $fillable = ['name', 'time', 'url', 'post_id'];

    protected $appends = ['isPlay', 'startTime', 'duration', 'playProgress', 'innerAudioContext'];

    public function getIsPlayAttribute(){
        return false;
    }

    public function getStartTimeAttribute(){
        return 0;
    }

    public function getDurationAttribute(){
        return 0;
    }

    public function getPlayProgressAttribute(){
        return 0;
    }

    public function getInnerAudioContextAttribute(){
        return null;
    }

}
